package ua.edu.nuos.tees.jdmmon.vo.interfaces;

/**
 * Interface for output (to device) RTU or ASCII package
 *
 * @author Timur Yarosh
 * @author Olha Mudrievska
 *         21.02.13
 */
public interface OutputPackage {
    /**
     * Set device address
     * @param deviceAddress address of device
     */
    public void setDeviceAddress(int deviceAddress);
    /**
     * Get device address
     * @return device address
     */
    public int getDeviceAddress();
    /**
     * Set modbus function
     * @param modbusFunction modbus function
     */
    public void setModbusFunction(int modbusFunction);
    /**
     * Get modbus function
     * @return modbus function
     */
    public int getModbusFunction();
    /**
     * Set required register address
     * @param registerAddress register address
     */
    public void setRegisterAddress(int registerAddress);
    /**
     * Get required register address
     * @return register address
     */
    public int getRegisterAddress();
    /**
     * Set registers' number to be read
     * @param dataSize number of registers
     */
    public void setDataSize(int dataSize);
    /**
     * Get registers' number to be read
     * @return registers' number
     */
    public int getDataSize();
    /**
     * Get CRC
     * @return CRC
     */
    public int getCRC();

    /**
     * Get byte array from package
     * @return byte array with package data
     */
    public byte[] toBytes();
}
